package com.x.attendance.assemble.control.jaxrs.attendance;

import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;

public class ActionGetAttendanceRecord extends BaseAction {

    private static Logger logger = LoggerFactory.getLogger(ActionGetAttendanceRecord.class);

    public ActionResult<Wo> execute(EffectivePerson effectivePerson, String recordId) throws Exception {
        ActionResult<Wo> result = new ActionResult<>();
        
        try {
            // TODO: 实现获取考勤记录详情逻辑
            Wo wo = new Wo();
            wo.setId(recordId);
            wo.setEmployeeName("未知员工");
            result.setData(wo);
        } catch (Exception e) {
            logger.error(e);
            throw e;
        }
        
        return result;
    }

    public static class Wo {
        private String id;
        private String employeeName;
        private String punchTime;
        private String deviceName;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getEmployeeName() {
            return employeeName;
        }

        public void setEmployeeName(String employeeName) {
            this.employeeName = employeeName;
        }

        public String getPunchTime() {
            return punchTime;
        }

        public void setPunchTime(String punchTime) {
            this.punchTime = punchTime;
        }

        public String getDeviceName() {
            return deviceName;
        }

        public void setDeviceName(String deviceName) {
            this.deviceName = deviceName;
        }
    }
}

